﻿#ifndef CORE_DEFINES_H_
#define CORE_DEFINES_H_

#include <cstdint>
#include <string>
#include <vector>

#include "zlbase/zlbase.h"

struct ZLBasePlugin
{
    int32_t type;
    std::string name;
    std::string version;
    std::string uuid;
    std::string filename;
};

struct ZLBaseDevice
{
    std::string id;
    int32_t type;
    std::string name;
    int32_t number;
    bool enable_debug;

    // 开门板
    int32_t boxcount;

    // 监控板

    // 温控板

    // 协议
    struct Protocol
    {
        std::string version;
        std::string name;
        std::string uuid;
        int32_t type;
    };
    Protocol protocol;

    // 链路
    using Datalink = zl::zlbase::DatalinkOption;
    Datalink datalink;
};

struct ZLBaseInfo
{
    std::string version;

    std::vector<ZLBaseDevice> devices;
};

struct ZLPeripheralsDevice
{
    // todo
    std::string id;
};

struct ZLPeripheralsInfo
{
    std::vector<ZLPeripheralsDevice> devices;
};

struct ZLDeviceConfig
{
    ZLBaseInfo zlbase_info;
    ZLPeripheralsInfo peripherals_info;
};

#endif  // CORE_DEFINES_H_
